package com.lx.demo1;

public class ClientMain {
    //动态代理
    public static void main(String[] args) {
        //要被代理的对象
        LandLord landLord = new LandLord();
        ProxyInvocationHandler invocationHandler = new ProxyInvocationHandler();
        invocationHandler.setTarget(landLord);

        Rent rent = (Rent) invocationHandler.getProxyExample();
        rent.rent();
    }

}
